#!/usr/bin/env python
# To use:
#       python setup.py install
#
import os, sys, string, re
from glob import glob

try:
    import distutils
    from distutils.command.install import install
    from distutils.core import setup, Extension
except:
    raise SystemExit, "Distutils not installed- see http://www.python.org/sigs/distutils-sig/download.html"

BASE="/usr/local/mathematica/"
PLATFORM="Linux-x86-64"
COMPILER_ADDITIONS=os.path.join(BASE, "SystemFiles/Links/MathLink/DeveloperKit", PLATFORM, "CompilerAdditions")
LIBRARY='ML64i3'

setup (name = "pyMathematica",
       packages = [''],
       package_dir = {'': 'Mathematica'},
       version = '1.0rc1',
       maintainer = "David Konerding",
       maintainer_email = "dakoner@gmail.com",
       description = "pyMathematica: Python Mathematica interface",
       include_dirs = [COMPILER_ADDITIONS],
       url = "http://py-ml.sourceforge.net",
       ext_modules = [Extension('_mathlink', ['mathlink/_mathlink.c'], 
       				library_dirs=[COMPILER_ADDITIONS],
				libraries=[LIBRARY,'rt'],
                                )
                      ]
       )
